package com.itheima.service.mongo.impl;

import com.itheima.domain.mongo.Freeze;
import com.itheima.domain.mongo.UnFreeze;
import com.itheima.service.mongo.FreeService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;


@DubboService
public class FreeServiceImpl implements FreeService {

    @Autowired
    private MongoTemplate mongoTemplate;

    //用户冻结操作
    @Override
    public void saveFreezeUser(Freeze freeze) {
        mongoTemplate.save(freeze);

    }

    //用户解冻操作
    @Override
    public void deleteFreezeUser(UnFreeze unFreeze) {

        //保存解冻操作
        mongoTemplate.save(unFreeze);
    }
}
